﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace xna_game_engine.source
{
    public class DeathSpell: BaseSpell
    {
        // animation type

        public DeathSpell(BaseWizard own, String path) : base(own)
        {
            mDamage = (int)own.MaxHealth;
            mModel = GameGlobals.Content.Load<Texture2D>(path);
            mBoundingBox = new Rectangle((int)mPos.X, (int)mPos.Y, mModel.Width, mModel.Height);
            mSpellType = SPELL_TYPE.DAMAGE;
        }

        // Force all children to implement these functions
        public override void Use()
        {
            mVelocity = new Vector2(15.0f, 0.0f);
            mPos = mOwner.Position + new Vector2(15.0f, 5.0f);
            mIsActive = true;
        }
        public override void Update(GameTime gt)
        {
            mPos += mVelocity;
            mBoundingBox.Location = new Point((int)mPos.X, (int)mPos.Y);
        }
        public override void Draw()
        {
            GameSystems.Graphics.DrawImage(mModel, mPos, Color.White);
        }
    }
}
